Option Explicit '-------------------------------- main ------------------------------------------ Function ExeLoop() 'Dim timerID ' ClearTimeOut(TimerID) ' 実行ボタンの連打を防ぐためボタンを無効にする。 document.getElementById("EXE_BUTTON").disabled = true ' テキストファイルを作成する Call CreateText() ' テキストファイルに書き込む Call WriteText() document.getElementById("JOUTAI").innerHTML= "Completed Making Initial File" ' 実行ボタンを有効にする。 document.getElementById("EXE_BUTTON").disabled = false End Function '-------------------------------- Make new text file ------------------------------------------ Function CreateText() Dim objFileSys Dim strCreateFile Set objFileSys = CreateObject("Scripting.FileSystemObject") strCreateFile = objFileSys.BuildPath(".\", "WIS.ini") objFileSys.CreateTextFile strCreateFile Set objFileSys = Nothing End Function '-------------------------------- Write text file ------------------------------------------ Function WriteText() Dim objFso Dim objFile Dim time Dim area Dim east Dim west Dim south Dim north Dim elim Dim id Dim password Dim proxy Dim port Dim use_proxy Set objFso = CreateObject("Scripting.FileSystemObject") Set objFile = objFso.OpenTextFile(".\WIS.ini", 8, True) time = document.getElementbyID( "time" ).value objFile.WriteLine "Time" objFile.WriteLine time area = document.getElementbyID( "area" ).value objFile.WriteLine "Area" objFile.WriteLine area east = document.getElementbyID( "east" ).value objFile.WriteLine "East" objFile.WriteLine east west = document.getElementbyID( "west" ).value objFile.WriteLine "West" objFile.WriteLine west south = document.getElementbyID( "south" ).value objFile.WriteLine "South" objFile.WriteLine south north = document.getElementbyID( "north" ).value objFile.WriteLine "North" objFile.WriteLine north elim = document.getElementbyID( "elim" ).value objFile.WriteLine "Org" objFile.WriteLine elim objFile.WriteLine "Cut" objFile.WriteLine elim objFile.WriteLine "Obs" objFile.WriteLine elim id = document.getElementbyID( "id" ).value objFile.WriteLine "UserID" objFile.WriteLine id password = document.getElementbyID( "password" ).value objFile.WriteLine "Password" objFile.WriteLine password objFile.WriteLine "Https_proxy" If document.getElementbyID( "use_proxy" ).Checked then proxy = document.getElementbyID( "proxy" ).value port = document.getElementbyID( "port" ).value objFile.WriteLine proxy & ":" & port objFile.WriteLine "Use_proxy" objFile.WriteLine "on" Else objFile.WriteLine "" objFile.WriteLine "Use_proxy" objFile.WriteLine "off" End If objFile.Close Set objFile = Nothing Set objFso = Nothing End Function '--------------Change Pulldown Menu-------------------------- '--------------Invalidate TextBox-------------------------- '---------------------------------------- Function Ending() Dim oShell,sCommand,check set oShell = CreateObject("WScript.Shell") check = MsgBox(" Program Ending ok?",vbYesNo) if check <> 7 then sCommand = "cmd /c Ending.bat" oShell.Run sCommand,0,False Window.Close set oShell = Nothing else Exit Function end if End Function